var tabs = $$('.tabs LI.tab'),
	content = $$('.tabcontent');

tabs.each(function(tab, index){
	tab.addEvent('click', function(){
		tabs.removeClass('selected');
		content.removeClass('selected');
		tabs[index].addClass('selected');
		content[index].addClass('selected');
	});
});
